﻿public class MyQueue
{
    private Stack<int> inputStack;
    private Stack<int> outputStack;
    
    public MyQueue() {
        inputStack = new Stack<int>();
        outputStack = new Stack<int>();
    }
    
    public void Push(int x) {
        inputStack.Push(x);
    }
    
    public int Pop()
    {
        Peek();
        return outputStack.Pop();
    }
    
    public int Peek()
    {
        if (outputStack.Count == 0)
        {
            while (inputStack.Count != 0)
            {
                outputStack.Push(inputStack.Pop());
            }
        }

        return outputStack.Peek();
    }
    
    public bool Empty() {
        if (outputStack.Count == 0 && inputStack.Count == 0)
        {
            return true;
        }

        return false;
    }
}

public class Solution
{
    public static void Main(string[] args)
    {
        
    }
}
